Optimal. Leaf size=187 \[ \frac {2 a (9 A+8 B) \tan (c+d x) \sec ^3(c+d x)}{63 d \sqrt {a \sec (c+d x)+a}}+\frac {4 (9 A+8 B) \tan (c+d x) (a \sec (c+d x)+a)^{3/2}}{105 a d}-\frac {8 (9 A+8 B) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{315 d}+\frac {4 a (9 A+8 B) \tan (c+d x)}{45 d \sqrt {a \sec (c+d x)+a}}+\frac {2 a B \tan (c+d x) \sec ^4(c+d x)}{9 d \sqrt {a \sec (c+d x)+a}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.34, antiderivative size = 187, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.152, Rules used = {4016, 3803, 3800, 4001, 3792} \[ \frac {2 a (9 A+8 B) \tan (c+d x) \sec ^3(c+d x)}{63 d \sqrt {a \sec (c+d x)+a}}+\frac {4 (9 A+8 B) \tan (c+d x) (a \sec (c+d x)+a)^{3/2}}{105 a d}-\frac {8 (9 A+8 B) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{315 d}+\frac {4 a (9 A+8 B) \tan (c+d x)}{45 d \sqrt {a \sec (c+d x)+a}}+\frac {2 a B \tan (c+d x) \sec ^4(c+d x)}{9 d \sqrt {a \sec (c+d x)+a}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3792
Rule 3800
Rule 3803
Rule 4001
Rule 4016
Rubi steps
\begin {align*} \int \sec ^4(c+d x) \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx &=\frac {2 a B \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {1}{9} (9 A+8 B) \int \sec ^4(c+d x) \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {2 a (9 A+8 B) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a B \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {1}{21} (2 (9 A+8 B)) \int \sec ^3(c+d x) \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {2 a (9 A+8 B) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a B \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {4 (9 A+8 B) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{105 a d}+\frac {(4 (9 A+8 B)) \int \sec (c+d x) \left (\frac {3 a}{2}-a \sec (c+d x)\right ) \sqrt {a+a \sec (c+d x)} \, dx}{105 a}\\ &=\frac {2 a (9 A+8 B) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a B \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}-\frac {8 (9 A+8 B) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{315 d}+\frac {4 (9 A+8 B) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{105 a d}+\frac {1}{45} (2 (9 A+8 B)) \int \sec (c+d x) \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {4 a (9 A+8 B) \tan (c+d x)}{45 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a (9 A+8 B) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a B \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}-\frac {8 (9 A+8 B) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{315 d}+\frac {4 (9 A+8 B) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{105 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.60, size = 98, normalized size = 0.52 \[ \frac {2 a \tan (c+d x) \left (5 (9 A+8 B) \sec ^3(c+d x)+6 (9 A+8 B) \sec ^2(c+d x)+8 (9 A+8 B) \sec (c+d x)+16 (9 A+8 B)+35 B \sec ^4(c+d x)\right )}{315 d \sqrt {a (\sec (c+d x)+1)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 122, normalized size = 0.65 \[ \frac {2 \, {\left (16 \, {\left (9 \, A + 8 \, B\right )} \cos \left (d x + c\right )^{4} + 8 \, {\left (9 \, A + 8 \, B\right )} \cos \left (d x + c\right )^{3} + 6 \, {\left (9 \, A + 8 \, B\right )} \cos \left (d x + c\right )^{2} + 5 \, {\left (9 \, A + 8 \, B\right )} \cos \left (d x + c\right ) + 35 \, B\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{315 \, {\left (d \cos \left (d x + c\right )^{5} + d \cos \left (d x + c\right )^{4}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 2.28, size = 268, normalized size = 1.43 \[ \frac {2 \, {\left (315 \, \sqrt {2} A a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 315 \, \sqrt {2} B a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - {\left (630 \, \sqrt {2} A a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 420 \, \sqrt {2} B a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - {\left (756 \, \sqrt {2} A a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 882 \, \sqrt {2} B a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - {\left (522 \, \sqrt {2} A a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 324 \, \sqrt {2} B a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - {\left (81 \, \sqrt {2} A a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 107 \, \sqrt {2} B a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{315 \, {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{4} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.64, size = 138, normalized size = 0.74 \[ -\frac {2 \left (-1+\cos \left (d x +c \right )\right ) \left (144 A \left (\cos ^{4}\left (d x +c \right )\right )+128 B \left (\cos ^{4}\left (d x +c \right )\right )+72 A \left (\cos ^{3}\left (d x +c \right )\right )+64 B \left (\cos ^{3}\left (d x +c \right )\right )+54 A \left (\cos ^{2}\left (d x +c \right )\right )+48 B \left (\cos ^{2}\left (d x +c \right )\right )+45 A \cos \left (d x +c \right )+40 B \cos \left (d x +c \right )+35 B \right ) \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}}{315 d \cos \left (d x +c \right )^{4} \sin \left (d x +c \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 10.05, size = 512, normalized size = 2.74 \[ \frac {\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\left (\frac {A\,16{}\mathrm {i}}{5\,d}+\frac {\left (48\,A-32\,B\right )\,1{}\mathrm {i}}{105\,d}\right )+\frac {\left (336\,A+672\,B\right )\,1{}\mathrm {i}}{105\,d}\right )}{\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )\,{\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,x\,2{}\mathrm {i}}+1\right )}^2}-\frac {\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\left (\frac {A\,16{}\mathrm {i}}{7\,d}-\frac {B\,320{}\mathrm {i}}{63\,d}\right )+\frac {B\,32{}\mathrm {i}}{7\,d}+\frac {\left (144\,A+288\,B\right )\,1{}\mathrm {i}}{63\,d}\right )}{\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )\,{\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,x\,2{}\mathrm {i}}+1\right )}^3}+\frac {\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left (-\frac {A\,16{}\mathrm {i}}{9\,d}+{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\left (\frac {A\,16{}\mathrm {i}}{9\,d}-\frac {\left (16\,A+32\,B\right )\,1{}\mathrm {i}}{9\,d}\right )+\frac {\left (16\,A+32\,B\right )\,1{}\mathrm {i}}{9\,d}\right )}{\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )\,{\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,x\,2{}\mathrm {i}}+1\right )}^4}-\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left (288\,A+256\,B\right )\,1{}\mathrm {i}}{315\,d\,\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )}-\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left (144\,A+128\,B\right )\,1{}\mathrm {i}}{315\,d\,\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )\,\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,x\,2{}\mathrm {i}}+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )} \left (A + B \sec {\left (c + d x \right )}\right ) \sec ^{4}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________